package com.leanyuan.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leanyuan.dao.TParkingspaceMapper_V;
import com.leanyuan.domain.TParkingspace;
import com.leanyuan.service.TParkingspaceService_V;
import com.leanyuan.vo.ParkingspaceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
@Service
public class TParkingspaceServiceVImpl_V extends ServiceImpl<TParkingspaceMapper_V, TParkingspace> implements TParkingspaceService_V {
    @Autowired
    private TParkingspaceMapper_V tParkingspaceMapperV;


    @Override
    public IPage<ParkingspaceVo> getAll1(Page<ParkingspaceVo> page) {
        return this.tParkingspaceMapperV.findByPage(page);
    }

    @Override
    public IPage<ParkingspaceVo> getAll2(Page<ParkingspaceVo> page, String carspaceNum, String carspaceType, Integer parkinglotId) {
        return this.tParkingspaceMapperV.findPageByParams(page,carspaceNum,carspaceType,parkinglotId);
    }

    @Override
    public IPage<ParkingspaceVo> findByPage2(Page<ParkingspaceVo> page) {
        return this.tParkingspaceMapperV.findByPage2(page);
    }

    @Override
    public IPage<ParkingspaceVo> findPageByParam(Page<ParkingspaceVo> page, String parkinglot, String parkingspacenumber) {
        return this.tParkingspaceMapperV.findParkingspacePageByParam(page,parkinglot,parkingspacenumber);
    }

    @Override
    public boolean updateParkingspaceState(Integer id, String state) {
        return this.tParkingspaceMapperV.updateParkingspaceState(id,state);
    }
}
